package com.dx_society.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 社团表
 * @TableName dx_societies
 */
@TableName(value ="dx_societies")
@Data
public class Societies implements Serializable {
    /**
     * 社团id
     */
    @TableId(type = IdType.AUTO)
    private Long soId;

    /**
     * 社团名称
     */
    private String soName;

    /**
     * 社长学号
     */
    private Long soMasterId;

    /**
     * 社长名称
     */
    private String soMasterName;

    /**
     * 社团介绍
     */
    private String soDetail;

    /**
     * 社团人数
     */
    private Long soCount;

    /**
     * 指导老师名称
     */
    private String soTeacherName;

    /**
     * 社团类型
     */
    private String soType;

    /**
     * 社团封面url
     */
    private String soImage;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Societies other = (Societies) that;
        return (this.getSoId() == null ? other.getSoId() == null : this.getSoId().equals(other.getSoId()))
            && (this.getSoName() == null ? other.getSoName() == null : this.getSoName().equals(other.getSoName()))
            && (this.getSoMasterId() == null ? other.getSoMasterId() == null : this.getSoMasterId().equals(other.getSoMasterId()))
            && (this.getSoMasterName() == null ? other.getSoMasterName() == null : this.getSoMasterName().equals(other.getSoMasterName()))
            && (this.getSoDetail() == null ? other.getSoDetail() == null : this.getSoDetail().equals(other.getSoDetail()))
            && (this.getSoCount() == null ? other.getSoCount() == null : this.getSoCount().equals(other.getSoCount()))
            && (this.getSoTeacherName() == null ? other.getSoTeacherName() == null : this.getSoTeacherName().equals(other.getSoTeacherName()))
            && (this.getSoType() == null ? other.getSoType() == null : this.getSoType().equals(other.getSoType()))
            && (this.getSoImage() == null ? other.getSoImage() == null : this.getSoImage().equals(other.getSoImage()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSoId() == null) ? 0 : getSoId().hashCode());
        result = prime * result + ((getSoName() == null) ? 0 : getSoName().hashCode());
        result = prime * result + ((getSoMasterId() == null) ? 0 : getSoMasterId().hashCode());
        result = prime * result + ((getSoMasterName() == null) ? 0 : getSoMasterName().hashCode());
        result = prime * result + ((getSoDetail() == null) ? 0 : getSoDetail().hashCode());
        result = prime * result + ((getSoCount() == null) ? 0 : getSoCount().hashCode());
        result = prime * result + ((getSoTeacherName() == null) ? 0 : getSoTeacherName().hashCode());
        result = prime * result + ((getSoType() == null) ? 0 : getSoType().hashCode());
        result = prime * result + ((getSoImage() == null) ? 0 : getSoImage().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", soId=").append(soId);
        sb.append(", soName=").append(soName);
        sb.append(", soMasterId=").append(soMasterId);
        sb.append(", soMasterName=").append(soMasterName);
        sb.append(", soDetail=").append(soDetail);
        sb.append(", soCount=").append(soCount);
        sb.append(", soTeacherName=").append(soTeacherName);
        sb.append(", soType=").append(soType);
        sb.append(", soImage=").append(soImage);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}